package Rental;

use Moose;

has '_movie' => (
    isa => 'Movie',
    reader => 'get_movie',
    writer => '_set_movie',
    required => 1,
);

has '_days_rented' => (
    isa => 'Int',
    reader => 'get_days_rented',
    writer => '_set_days_rented',
    required => 1,
);

sub get_charge {
    my $self = shift;

    return $self->get_movie()->get_charge($self->get_days_rented());
}

sub get_fre_rental_points {
    my $self = shift;

    return $self->get_movie()->get_fre_rental_points($self->get_days_rented());
}
1;
